package exception;

/**
 * A runtime exception class. When a number would be reached that is to large for the given class of numbers,
 * this exception should be thrown. (else a negative number would be made that has no meaning at all.)
 * 
 * @author Molderez Tom, 2de bach Ingenieurswetenschappen Computerwetenschappen-Elektrotechniek and Reniers Jorn, 2de bach Ingenieurswetenschappen Werktuigkunde-Computerwetenschappen
 * @version 1.0
 */
public class OverFlowException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	/**
	 * Creates a overflow exception.
	 * 
	 * @param number The number class for with this exception is been created
	 * @param message The message of this exception
	 */
	public OverFlowException(Class<?> number, String message) {
		super(message);
		this.number = number;
	}
	
	/**
	 * Returns the message with this overflow exception.
	 */
	public String getMessage() {
		return "" + number.toString() + "\n" + super.getMessage();
	}
	
	private Class<?> number;
}
